using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class NewInitRequest : GeneratedMessageLite<NewInitRequest, NewInitRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<NewInitRequest, NewInitRequest.Builder>
		{
			private bool resultIsReadOnly;
			private NewInitRequest result;
			protected override NewInitRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override NewInitRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override NewInitRequest DefaultInstanceForType
			{
				get
				{
					return NewInitRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public string UserName
			{
				get
				{
					return this.result.UserName;
				}
				set
				{
					this.SetUserName(value);
				}
			}
			public SKBuiltinBuffer_t CurrentSynckey
			{
				get
				{
					return this.result.CurrentSynckey;
				}
				set
				{
					this.SetCurrentSynckey(value);
				}
			}
			public SKBuiltinBuffer_t MaxSynckey
			{
				get
				{
					return this.result.MaxSynckey;
				}
				set
				{
					this.SetMaxSynckey(value);
				}
			}
			public string Language
			{
				get
				{
					return this.result.Language;
				}
				set
				{
					this.SetLanguage(value);
				}
			}
			public Builder()
			{
				this.result = NewInitRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(NewInitRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private NewInitRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					NewInitRequest other = this.result;
					this.result = new NewInitRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override NewInitRequest.Builder Clear()
			{
				this.result = NewInitRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override NewInitRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new NewInitRequest.Builder(this.result);
				}
				return new NewInitRequest.Builder().MergeFrom(this.result);
			}
			public override NewInitRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override NewInitRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is NewInitRequest)
				{
					return this.MergeFrom((NewInitRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override NewInitRequest.Builder MergeFrom(NewInitRequest other)
			{
				return this;
			}
			public override NewInitRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override NewInitRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(NewInitRequest._newInitRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = NewInitRequest._newInitRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 18u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
						if (num3 == 18u)
						{
							this.result.hasUserName = input.ReadString(ref this.result.userName_);
							continue;
						}
					}
					else
					{
						if (num3 == 26u)
						{
							SKBuiltinBuffer_t.Builder builder2 = SKBuiltinBuffer_t.CreateBuilder();
							if (this.result.hasCurrentSynckey)
							{
								builder2.MergeFrom(this.CurrentSynckey);
							}
							input.ReadMessage(builder2, extensionRegistry);
							this.CurrentSynckey = builder2.BuildPartial();
							continue;
						}
						if (num3 == 34u)
						{
							SKBuiltinBuffer_t.Builder builder3 = SKBuiltinBuffer_t.CreateBuilder();
							if (this.result.hasMaxSynckey)
							{
								builder3.MergeFrom(this.MaxSynckey);
							}
							input.ReadMessage(builder3, extensionRegistry);
							this.MaxSynckey = builder3.BuildPartial();
							continue;
						}
						if (num3 == 42u)
						{
							this.result.hasLanguage = input.ReadString(ref this.result.language_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public NewInitRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public NewInitRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public NewInitRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public NewInitRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public NewInitRequest.Builder SetUserName(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = value;
				return this;
			}
			public NewInitRequest.Builder ClearUserName()
			{
				this.PrepareBuilder();
				this.result.hasUserName = false;
				this.result.userName_ = "";
				return this;
			}
			public NewInitRequest.Builder SetCurrentSynckey(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasCurrentSynckey = true;
				this.result.currentSynckey_ = value;
				return this;
			}
			public NewInitRequest.Builder SetCurrentSynckey(SKBuiltinBuffer_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasCurrentSynckey = true;
				this.result.currentSynckey_ = builderForValue.Build();
				return this;
			}
			public NewInitRequest.Builder MergeCurrentSynckey(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasCurrentSynckey && this.result.currentSynckey_ != SKBuiltinBuffer_t.DefaultInstance)
				{
					this.result.currentSynckey_ = SKBuiltinBuffer_t.CreateBuilder(this.result.currentSynckey_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.currentSynckey_ = value;
				}
				this.result.hasCurrentSynckey = true;
				return this;
			}
			public NewInitRequest.Builder ClearCurrentSynckey()
			{
				this.PrepareBuilder();
				this.result.hasCurrentSynckey = false;
				this.result.currentSynckey_ = null;
				return this;
			}
			public NewInitRequest.Builder SetMaxSynckey(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasMaxSynckey = true;
				this.result.maxSynckey_ = value;
				return this;
			}
			public NewInitRequest.Builder SetMaxSynckey(SKBuiltinBuffer_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasMaxSynckey = true;
				this.result.maxSynckey_ = builderForValue.Build();
				return this;
			}
			public NewInitRequest.Builder MergeMaxSynckey(SKBuiltinBuffer_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasMaxSynckey && this.result.maxSynckey_ != SKBuiltinBuffer_t.DefaultInstance)
				{
					this.result.maxSynckey_ = SKBuiltinBuffer_t.CreateBuilder(this.result.maxSynckey_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.maxSynckey_ = value;
				}
				this.result.hasMaxSynckey = true;
				return this;
			}
			public NewInitRequest.Builder ClearMaxSynckey()
			{
				this.PrepareBuilder();
				this.result.hasMaxSynckey = false;
				this.result.maxSynckey_ = null;
				return this;
			}
			public NewInitRequest.Builder SetLanguage(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasLanguage = true;
				this.result.language_ = value;
				return this;
			}
			public NewInitRequest.Builder ClearLanguage()
			{
				this.PrepareBuilder();
				this.result.hasLanguage = false;
				this.result.language_ = "";
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int UserNameFieldNumber = 2;
		public const int CurrentSynckeyFieldNumber = 3;
		public const int MaxSynckeyFieldNumber = 4;
		public const int LanguageFieldNumber = 5;
		private static readonly NewInitRequest defaultInstance;
		private static readonly string[] _newInitRequestFieldNames;
		private static readonly uint[] _newInitRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasUserName;
		private string userName_ = "";
		private bool hasCurrentSynckey;
		private SKBuiltinBuffer_t currentSynckey_;
		private bool hasMaxSynckey;
		private SKBuiltinBuffer_t maxSynckey_;
		private bool hasLanguage;
		private string language_ = "";
		private int memoizedSerializedSize = -1;
		public static NewInitRequest DefaultInstance
		{
			get
			{
				return NewInitRequest.defaultInstance;
			}
		}
		public override NewInitRequest DefaultInstanceForType
		{
			get
			{
				return NewInitRequest.DefaultInstance;
			}
		}
		protected override NewInitRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public string UserName
		{
			get
			{
				return this.userName_;
			}
		}
		public SKBuiltinBuffer_t CurrentSynckey
		{
			get
			{
				return this.currentSynckey_ ?? SKBuiltinBuffer_t.DefaultInstance;
			}
		}
		public SKBuiltinBuffer_t MaxSynckey
		{
			get
			{
				return this.maxSynckey_ ?? SKBuiltinBuffer_t.DefaultInstance;
			}
		}
		public string Language
		{
			get
			{
				return this.language_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.hasCurrentSynckey && this.hasMaxSynckey && this.BaseRequest.IsInitialized && this.CurrentSynckey.IsInitialized && this.MaxSynckey.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasUserName)
				{
					num += CodedOutputStream.ComputeStringSize(2, this.UserName);
				}
				if (this.hasCurrentSynckey)
				{
					num += CodedOutputStream.ComputeMessageSize(3, this.CurrentSynckey);
				}
				if (this.hasMaxSynckey)
				{
					num += CodedOutputStream.ComputeMessageSize(4, this.MaxSynckey);
				}
				if (this.hasLanguage)
				{
					num += CodedOutputStream.ComputeStringSize(5, this.Language);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private NewInitRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] newInitRequestFieldNames = NewInitRequest._newInitRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, newInitRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasUserName)
			{
				output.WriteString(2, newInitRequestFieldNames[4], this.UserName);
			}
			if (this.hasCurrentSynckey)
			{
				output.WriteMessage(3, newInitRequestFieldNames[1], this.CurrentSynckey);
			}
			if (this.hasMaxSynckey)
			{
				output.WriteMessage(4, newInitRequestFieldNames[3], this.MaxSynckey);
			}
			if (this.hasLanguage)
			{
				output.WriteString(5, newInitRequestFieldNames[2], this.Language);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasUserName)
			{
				num ^= this.userName_.GetHashCode();
			}
			if (this.hasCurrentSynckey)
			{
				num ^= this.currentSynckey_.GetHashCode();
			}
			if (this.hasMaxSynckey)
			{
				num ^= this.maxSynckey_.GetHashCode();
			}
			if (this.hasLanguage)
			{
				num ^= this.language_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			NewInitRequest newInitRequest = value as NewInitRequest;
			return newInitRequest != null && (this.hasBaseRequest == newInitRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(newInitRequest.baseRequest_))) && (this.hasUserName == newInitRequest.hasUserName && (!this.hasUserName || this.userName_.Equals(newInitRequest.userName_))) && (this.hasCurrentSynckey == newInitRequest.hasCurrentSynckey && (!this.hasCurrentSynckey || this.currentSynckey_.Equals(newInitRequest.currentSynckey_))) && (this.hasMaxSynckey == newInitRequest.hasMaxSynckey && (!this.hasMaxSynckey || this.maxSynckey_.Equals(newInitRequest.maxSynckey_))) && (this.hasLanguage == newInitRequest.hasLanguage && (!this.hasLanguage || this.language_.Equals(newInitRequest.language_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<NewInitRequest, NewInitRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<NewInitRequest, NewInitRequest.Builder>.PrintField("UserName", this.hasUserName, this.userName_, writer);
			GeneratedMessageLite<NewInitRequest, NewInitRequest.Builder>.PrintField("CurrentSynckey", this.hasCurrentSynckey, this.currentSynckey_, writer);
			GeneratedMessageLite<NewInitRequest, NewInitRequest.Builder>.PrintField("MaxSynckey", this.hasMaxSynckey, this.maxSynckey_, writer);
			GeneratedMessageLite<NewInitRequest, NewInitRequest.Builder>.PrintField("Language", this.hasLanguage, this.language_, writer);
		}
		public static NewInitRequest ParseFrom(byte[] data)
		{
			return NewInitRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private NewInitRequest MakeReadOnly()
		{
			return this;
		}
		public static NewInitRequest.Builder CreateBuilder()
		{
			return new NewInitRequest.Builder();
		}
		public override NewInitRequest.Builder ToBuilder()
		{
			return NewInitRequest.CreateBuilder(this);
		}
		public override NewInitRequest.Builder CreateBuilderForType()
		{
			return new NewInitRequest.Builder();
		}
		public static NewInitRequest.Builder CreateBuilder(NewInitRequest prototype)
		{
			return new NewInitRequest.Builder(prototype);
		}
		static NewInitRequest()
		{
			NewInitRequest.defaultInstance = new NewInitRequest().MakeReadOnly();
			NewInitRequest._newInitRequestFieldNames = new string[]
			{
				"BaseRequest",
				"CurrentSynckey",
				"Language",
				"MaxSynckey",
				"UserName"
			};
			NewInitRequest._newInitRequestFieldTags = new uint[]
			{
				10u,
				26u,
				42u,
				34u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.NewInitRequest.Descriptor, null);
		}
	}
}
